#include "waitwidget.h"
#include "ui_waitwidget.h"
#include <QIcon>

waitWidget::waitWidget(QWidget *parent) :
    QWidget(parent),
    ui(new Ui::waitWidget)
{
    ui->setupUi(this);

    basicSettings();
    connectSettings();
}

waitWidget::~waitWidget()
{
    delete ui;
}

void waitWidget::basicSettings()
{
    this->setWindowFlag(Qt::FramelessWindowHint);
    this->setAttribute(Qt::WA_TranslucentBackground);
    this->setWindowModality(Qt::ApplicationModal);

    ui->labGIF->setMovie(gif);
    gif->start();

    ui->labInfor1->setText("正在运行");
    ui->labInfor2->setText("请稍候...");
    ui->labInfor1->setStyleSheet("QLabel{color:rgb(255, 255, 255);font: italic 20pt 'Monotype Corsiva';}");
    ui->labInfor2->setStyleSheet("QLabel{color:rgb(255, 255, 255);font: italic 20pt 'Monotype Corsiva';}");

    ui->bottomWidget->setStyleSheet("QWidget{background-color:rgb(110, 37, 255);border-radius:20px;}");
    ui->gifWidget->setStyleSheet("QWidget{background-color:rgb(255, 255, 255);border-radius:20px;}");

    this->setWindowTitle("请稍候");
    this->setWindowIcon(QIcon(":/icon/logo.png"));
}

void waitWidget::connectSettings()
{
}
